<?php

//TuấnNK add (20080617_10h):
//Các xử lý cho ajax:
//echo basename($_SERVER['PHP_SELF']);

require_once 'core/Debug.php'; //System Debug...
require_once 'core/config.php'; //System Config...
require_once 'core/Init.php';  //System Init...
//System process & output for ajax request

$choice = array(
    "index" => "index",
    "user" => "ajax_user",
    "item" => "ajax_item",
    "comment" => "ajax_comment",
    "misc" => "ajax_misc",
    "personal" => "ajax_personal",
    "admin" => "ajax_admin",
    "manage" => "ajax_manage",
    "upload" => "ajax_upload",
    "shop_giaodich" => "ajax_shop_giaodich",
    "shop" => "ajax_shop",
    "ad" => "ajax_ad",
    "payment" => "ajax_payment"
);

$action = AZLib::getParam('act');

if ($action == "" || $choice[$action] == "") {
    $choice[$action] = "index";
}

require_once(ROOT_PATH . "includes/ajax_action/" . $choice[$action] . ".ajax.php");

$run_me = new $choice[$action] ();
$run_me->playme();

//End process & ouput
//Stop System
System::halt();
?>